package com.cloud.wms.ui.inside.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ZiLlion
 * date：2018/7/5
 * desc:
 */
public class RecordGoodsEntity implements Parcelable {
    private long posID;
    private String posCode;
    private long commodityId;
    private String commodityName;
    private String barCode;
    private int stockType;
    private int amount;

    public long getPosID() {
        return posID;
    }

    public void setPosID(long posID) {
        this.posID = posID;
    }

    public String getPosCode() {
        return posCode;
    }

    public void setPosCode(String posCode) {
        this.posCode = posCode;
    }

    public long getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(long commodityId) {
        this.commodityId = commodityId;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        barCode = barCode;
    }

    public int getStockType() {
        return stockType;
    }

    public void setStockType(int stockType) {
        this.stockType = stockType;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public RecordGoodsEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.posID);
        dest.writeString(this.posCode);
        dest.writeLong(this.commodityId);
        dest.writeString(this.commodityName);
        dest.writeString(this.barCode);
        dest.writeInt(this.stockType);
        dest.writeInt(this.amount);
    }

    protected RecordGoodsEntity(Parcel in) {
        this.posID = in.readLong();
        this.posCode = in.readString();
        this.commodityId = in.readLong();
        this.commodityName = in.readString();
        this.barCode = in.readString();
        this.stockType = in.readInt();
        this.amount = in.readInt();
    }

    public static final Creator<RecordGoodsEntity> CREATOR = new Creator<RecordGoodsEntity>() {
        @Override
        public RecordGoodsEntity createFromParcel(Parcel source) {
            return new RecordGoodsEntity(source);
        }

        @Override
        public RecordGoodsEntity[] newArray(int size) {
            return new RecordGoodsEntity[size];
        }
    };
}
